#-*- coding: utf-8 -*-

class GROUND_TYPE:
    CORN = 'CORN'
    IRON = 'IRON'
    CLAY = 'CLAY'
    WOOD = 'WOOD'
    
    CHOICES = ((CORN, 'Corn Field'),
               (IRON, 'Iron Mine'),
               (CLAY, 'Clay Pit'),
               (WOOD, 'Sawmill'))


class BUILDING_TYPE:
    EMPTY = 'EMPT'
    HOSPITAL = 'HSPT'
    EQUELLI = 'EQLL'
    
    CHOICES = ((EMPTY, 'Empty'),
               (HOSPITAL, 'Mental Hospital'),
               (EQUELLI, 'Equelli LTD'))
    

class GroundRule(object):
    __slots__ = ['corn', 'iron', 'clay', 'wood', 'product', 'time']

    def __init__(self, **kwargs):
        for key, value in kwargs.iteritems():
            setattr(self, key, value)


class BuildingRule(object):
    __slots__ = ['corn', 'iron', 'clay', 'wood', 'time']

    def __init__(self, **kwargs):
        for key, value in kwargs.iteritems():
            setattr(self, key, value)


GROUND_RULES = {
    GROUND_TYPE.CORN :
        [GroundRule(corn=5,  iron=5,  clay=5,  wood=5,  product=10, time=10),
         GroundRule(corn=10, iron=10, clay=10, wood=10, product=20, time=20),
         GroundRule(corn=15, iron=15, clay=15, wood=15, product=40, time=40),
         GroundRule(corn=25, iron=25, clay=25, wood=25, product=60, time=80),
         GroundRule(corn=35, iron=35, clay=35, wood=35, product=90, time=100)],
    GROUND_TYPE.IRON :
        [GroundRule(corn=5,  iron=5,  clay=5,  wood=5,  product=10, time=10),
         GroundRule(corn=10, iron=10, clay=10, wood=10, product=20, time=20),
         GroundRule(corn=15, iron=15, clay=15, wood=15, product=40, time=40),
         GroundRule(corn=25, iron=25, clay=25, wood=25, product=60, time=80),
         GroundRule(corn=35, iron=35, clay=35, wood=35, product=90, time=100)],
    GROUND_TYPE.CLAY :
        [GroundRule(corn=5,  iron=5,  clay=5,  wood=5,  product=10, time=10),
         GroundRule(corn=10, iron=10, clay=10, wood=10, product=20, time=20),
         GroundRule(corn=15, iron=15, clay=15, wood=15, product=40, time=40),
         GroundRule(corn=25, iron=25, clay=25, wood=25, product=60, time=80),
         GroundRule(corn=35, iron=35, clay=35, wood=35, product=90, time=100)],
    GROUND_TYPE.WOOD :
        [GroundRule(corn=5,  iron=5,  clay=5,  wood=5,  product=10, time=10),
         GroundRule(corn=10, iron=10, clay=10, wood=10, product=20, time=20),
         GroundRule(corn=15, iron=15, clay=15, wood=15, product=40, time=40),
         GroundRule(corn=25, iron=25, clay=25, wood=25, product=60, time=80),
         GroundRule(corn=35, iron=35, clay=35, wood=35, product=90, time=100)]
    }


BUIDING_RULES = {
    BUILDING_TYPE.HOSPITAL :
        [BuildingRule(corn=5,  iron=5,  clay=5,  wood=5,  time=10),
         BuildingRule(corn=5,  iron=5,  clay=5,  wood=5,  time=10)],
    BUILDING_TYPE.EQUELLI :
        [BuildingRule(corn=5,  iron=5,  clay=5,  wood=5,  time=10),
         BuildingRule(corn=5,  iron=5,  clay=5,  wood=5,  time=10)]
    }

